package org.jeecg.modules.flow.sys.base;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.flow.sys.entity.dto.BaseFlowDto;
import org.jeecg.modules.flow.sys.util.SpringContextUtil;

/*
 * 项目名称:    wms-server-jeecg
 * 接口描述:    //
 * 创建人员:    zhaojun
 * 创建时间:    2023-09-14
 */
@Slf4j
@AllArgsConstructor
public class SpringRunBean<T> implements SpringRunInterface {

    private String beanName;
    private BaseFlowDto base;


    @Override
    public void call() {
        CustomBeanRunInterface customBeanRunInterface = (CustomBeanRunInterface) SpringContextUtil.getBean(beanName);
        customBeanRunInterface.run(base);
    }
}
